'''
@Author: hua
@Date: 2019-12-03 14:13:15
@description:
@LastEditors: hua
@LastEditTime: 2019-12-03 14:51:34
'''

from sqlalchemy import event
from application.models import User
import time


@event.listens_for(User, "before_insert")
def log_before_insert(mapper, connection, target):
    target.create_time = int(time.time())
